<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>033-卷入-卷出-切换.html</title>
	<style>
		div{
			width: 200px;
			height: 200px;
			background-color: red;
			display: none;
		}
	</style>
</head>
<body>
	<button>卷入</button>
	<button>卷出</button>
	<button>切换</button>
	<div></div>
</body>
<script src="js/jquery-1.12.4.js"></script>
<script>
	$(function(){
		$('button').eq(0).on('click',function(){
			$('div').slideDown(1000,function(){
				alert('slideDown done');
			});
		});
		$('button').eq(1).on('click',function(){
			$('div').slideUp(1000,function(){
				alert('slideUp done');
			});
		});
		$('button').eq(2).on('click',function(){
			$('div').slideToggle(1000,function(){
				alert('slideToggle done');
			});
		});
	})
</script>
</html>